<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../common.jsp" %>
<script type="text/javascript"> 			
		function add(){
				
				var uname = document.getElementById("name");
				var password = document.getElementById("pwd");
				var value1 = uname.value;
				var value2 = password.value;
				if(value1==null||value1==""){
					document.getElementById("name_msg").innerHTML = "*姓名不能为空";
					 return false;
				}else{
					document.getElementById("name_msg").innerHTML = "";
				}
				if(value2==null||value2==""){
					document.getElementById("name_msg").innerHTML = "*密码不能为空";
					return  false;
				}else{
					document.getElementById("name_msg").innerHTML = "";
				}
			  
			}
		</script>
		<form name="newEmpAdd" method="post" action="../emp/updateEmpAction.action?emp.empId=${emp.empId }&emp.empStyle=${emp.empStyle}&emp.empState=${emp.empState}" 
		 onsubmit="return add()">
	     <div id="content_right">
						<br />
						<br />
						<br />
						
							<table cellpadding="0" cellspacing="1" border="0"
								class="form_table1">
								<tr>
									<td>
										&nbsp;&nbsp;&nbsp;&nbsp;姓名 ：
									</td>
									<td>
										<input type="text" id="name" name="emp.empName" value="${emp.empName }" class="inputgri" onblur="add()"
										 onpropertychange="with(this)if(/[^\u3447-\uFA29]/ig.test(value))value=value.replace(/[^\u3447-\uFA29]/ig,'')"/> 
										&nbsp;
									</td>
									<td id="d1">
									<font id="name_msg" color="red" size="2"></font></td>
								</tr>
								<tr>
									<td>
										&nbsp;&nbsp;&nbsp;&nbsp;密码 ：
									</td>
									<td>
										<input type="text" id="pwd" name="emp.empPasswd" value="${emp.empPasswd }" class="inputgri" size="21" onblur="add()"/>
										&nbsp;
										
									</td>
									<td id="d2">
									<font id="pwd_msg" color="red" size="2"></font></td>
								</tr>
								<tr>
									<td>
										&nbsp;&nbsp;&nbsp;所属部门 ：
									</td>
									<td>
										<input type="text" id="dept" name="emp.department.deptId" value="${emp.department.deptId }" class="inputgri" size="21" "/>
										&nbsp;
										
									</td>
					
									
									<td id="d3"></td>
								</tr>
								<tr>
									<td>
										&nbsp;&nbsp;&nbsp;人员类型 ：
									</td>
									<td>
									<font id="pwd_msg" color="red" size="2">
									<c:choose >
									<c:when test="${emp.empStyle==1}">普通员工</c:when>
									<c:when test="${emp.empStyle==2}">普通管理员</c:when>
									<c:when test="${emp.empStyle==3}">系统管理员</c:when>
								</c:choose>
									</td></font>
									<td id="d4"></td>
								</tr>
								<tr>
									<td>
										&nbsp;&nbsp;&nbsp;人员电话 ：
									</td>
									<td>
										<input type="text" id="mobile" name="emp.empMobile" value="${emp.empMobile}" class="inputgri" />
										&nbsp;
										<font color="red" size="2"></font>
									</td>
									<td id="d5"></td>
								</tr>
								<tr>
									<td>
										&nbsp;&nbsp;&nbsp;电子邮件 ：
									</td>
									<td>
										<input type="text" name="emp.empEmail" value="${emp.empEmail}" class="inputgri" />
										&nbsp;
										<font color="red" size="2"></font>
									</td>
									 <td>
				                        </td>
								</tr>
								<tr>
									<td>
										&nbsp;&nbsp;&nbsp;人员手机 ：
									</td>
									<td>
										<input type="text" name="emp.empTel" value="${emp.empTel}" class="inputgri" />
										&nbsp;
										<font color="red" size="2"></font>
								    <td>
								    
				                    </td>
								</tr>
								<tr>
									<td>
										&nbsp;&nbsp;&nbsp;人员角色 ：
									</td>
									<td>
										
										
				                       <td></td>
								</tr>
								<tr>
									<td>
										&nbsp;&nbsp;&nbsp;人员备注 ：
									</td>
									<td>
										<textarea name="emp.empRemark" rows="3" class="inputgri" >${emp.empRemark}</textarea>
										&nbsp;
										<font color="red" size="2"></font>
									</td>
									<td id="d8"></td>
								</tr>
							</table>
							
							<p align="center">
							<font color="red" size="2">${msg }</font>
								<input type="submit" class="button" value="确认 &raquo; " />
								&nbsp;
								&nbsp;
								&nbsp;
								<input type="button" class="button" value="返回 &raquo" onclick="location='empDaoList.action'">
								&nbsp;
							</p>
					
						<br />
							
						<br />
					</div>
					</form>
